﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RCSP.Common
{
    public static class Helper
    {
        public static int? ToNullableInt32(this string s)
        {
            int i;
            if (Int32.TryParse(s, out i)) return i;
            return null;
        }

        public static DateTime? ToNullableDateTime(this string s)
        {
           return string.IsNullOrEmpty(s) ? (DateTime?)null : DateTime.Parse(s);
        }

    }
}
